package com.youhome.service.service;

import com.github.pagehelper.PageInfo;
import com.youhome.common.exception.CustomException;
import com.youhome.service.model.BClient;
import com.youhome.service.model.Contacts;
import com.youhome.service.model.DateItem;
import com.youhome.service.model.Principal;
import com.youhome.service.parameter.ParamClientRegister;
import com.youhome.service.parameter.ParamCompanyClientSearch;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * Created by chen365 on 2017/10/25.
 */
public interface BClientService {

    int create(BClient client);

    int update(BClient client);

    BClient selectByPrimaryKey(Long clientId) throws CustomException;

    PageInfo<BClient> selectByBean(Integer pageNumber, Integer pageSize, BClient client);

    List<BClient> selectByBean(BClient client);

    int delete(BClient client);

    int isExist(String phone, Long counselorId);

    List<DateItem> selectLast30DayDateItemByShareGroupUUID(String shareGroupUuid) throws CustomException;

    BClient selectByUserId(Long userId);

    BClient updateInvestmentByPrimaryKey(Principal principal,BClient client) throws CustomException;

    BClient updateByBasicsPrimaryKey(Principal principal, BClient client) throws CustomException;

    boolean selectExistsByPrimaryKey(Long clientId);

    int save(BClient client);

    String export(Principal principal) throws CustomException;

    PageInfo<BClient> selectByBean(Principal principal, Integer pageNumber, Integer pageSize, String keyword, BClient map) throws CustomException;

    BClient register(ParamClientRegister map) throws CustomException;

    int deleteByClientId(Principal principal, Long clientId) throws CustomException;

    String companyExport(Principal principal) throws CustomException;

    BClient selectDetail(Principal principal) throws CustomException;

    void updatePhoto(Principal principal,String photo) throws CustomException;

    PageInfo<BClient> selectCompanyClientByBean(Principal principal, ParamCompanyClientSearch map) throws CustomException;

    void updateOfWXUpdate(HttpServletRequest request, BClient client) throws CustomException;

    PageInfo<BClient> selectByBean(String phone, Integer pageNumber, Integer pageSize) throws CustomException;

    BClient selectByClientIdOfMobile(Long clientId) throws CustomException;

    void deleteByClientId(String phone, Long clientId) throws CustomException;

    void create(String phone, BClient client) throws CustomException;

    void updateOfMobile(String phone, BClient map) throws CustomException;
}

